package com.example.shixunandjavagotoyangchen.Eternity.LoginActivity;

import com.example.modelviewpresenter.Model.BasterModel;

import io.reactivex.Observable;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

/**
 * 作者:二徒
 * 时间：2021/11/12- 11:25
 * 功能实现：
 */
public class LoginModel extends BasterModel implements LoginContion.loginmodel {



    @Override
    public void getloginmodel(String username, String password, Observer<LoginBean> loginBeanObserver) {
        LoginOkhttp.getLoginOkhttp().getRetrofit().create(LoginApi.class).getlogin(username,password)
                .observeOn(AndroidSchedulers.mainThread())
                .subscribeOn(Schedulers.computation())
                .subscribe(loginBeanObserver);
    }
}
